Public Class frmParametros

    Private Sub ButtonItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem1.Click
        PageSlider1.SelectedPage = PageSliderPage1

    End Sub

    Private Sub frmParametros_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PageSlider1.SelectedPage = PageSliderPage1
        PageSlider2.SelectedPage = PageSliderPage11

        TextBoxX10.Text = BuscarStrDatoCitra("SELECT BD_NOI FROM PARAMETROS WHERE IDPARAMETRO=1")
    End Sub

    Private Sub ButtonItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem2.Click
        PageSlider1.SelectedPage = PageSliderPage4
    End Sub

    Private Sub ButtonItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem3.Click
        PageSlider1.SelectedPage = PageSliderPage5
    End Sub

    Private Sub ButtonItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem4.Click
        PageSlider1.SelectedPage = PageSliderPage6
    End Sub

    Private Sub ButtonItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem13.Click
        PageSlider2.SelectedPage = PageSliderPage12

    End Sub

    Private Sub ButtonItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem12.Click
        PageSlider2.SelectedPage = PageSliderPage11
    End Sub

    Private Sub TextBoxX10_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBoxX10.KeyDown
        If e.KeyCode = Keys.F3 Then
            Dim oFD As New OpenFileDialog
            With oFD
                .Title = "Seleccionar fichero"
                .Filter = "Ficheros de Firebird (*.fdb;)|*.fdb;" & _
                          "|Todos los ficheros (*.*)|*.*"
                .FileName = Me.TextBoxX10.Text
                If .ShowDialog = System.Windows.Forms.DialogResult.OK Then
                    Me.TextBoxX10.Text = .FileName
                End If
            End With


        End If
    End Sub

    Private Sub TextBoxX10_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBoxX10.TextChanged

    End Sub

    Private Sub ButtonItem16_Click(sender As System.Object, e As System.EventArgs) Handles ButtonItem16.Click
        Call SetSqlCitra("UPDATE PARAMETROS SET BD_NOI='" & TextBoxX10.Text & "', BD_RELOJ='" & txtChecador.Text & "' WHERE IDPARAMETRO=1")
        NoiConnection = "Driver=Firebird/InterBase(r) driver;User=SYSDBA;Password=masterkey;Database=" & BuscarStrDatoCitra("SELECT BD_NOI FROM PARAMETROS WHERE IDPARAMETRO=1") & ";DataSource=localhost; Port=3051;Dialect=3; Charset=NONE;Role=;Connection lifetime=15;Pooling=true; MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;"
        RelojConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & BuscarStrDatoCitra("SELECT BD_RELOJ FROM PARAMETROS WHERE IDPARAMETRO=1") & ";"
    End Sub

    Private Sub GENERALES_Click(sender As System.Object, e As System.EventArgs) Handles GENERALES.Click
        PageSlider1.SelectedPage = PageSliderPage2
    End Sub

    Private Sub txtChecador_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles txtChecador.KeyDown
        If e.KeyCode = Keys.F3 Then
            Dim oFD As New OpenFileDialog
            With oFD
                .Title = "Seleccionar fichero"
                .Filter = "Ficheros de Access (*.mdb;)|*.mdb;" & _
                          "|Todos los ficheros (*.*)|*.*"
                .FileName = Me.TextBoxX10.Text
                If .ShowDialog = System.Windows.Forms.DialogResult.OK Then
                    Me.txtChecador.Text = .FileName
                End If
            End With


        End If
    End Sub

    Private Sub txtChecador_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtChecador.KeyPress

    End Sub

    Private Sub txtChecador_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtChecador.TextChanged

    End Sub
End Class